#ifndef HEAD
#include "head.cc"
#endif

#include <stdlib.h>
#include <time.h>

void Test1()
{
    vector<int> arr;
    for (int i = 0; i < 10; i++)
    {
        arr.emplace_back(i);
    }
    vector<int> v = Solution().twoSum(arr, arr[0] + arr[7]);
    if(v.size() == 2)
    {
        sort(v.begin(), v.end());
        if((v[0] == 0 && v[1] == 7) || (v[0] == 3 && v[1] == 4) || (v[0] == 2 && v[1] == 5) || (v[0] == 1 && v[1] == 6))
        {
            std::cout << "通过用例1" << std::endl;
            return;
        }
    }
    std::cout << "没有通过用例1" << std::endl;
}

void Test2()
{
    vector<int> arr;
    for (int i = 0; i < 10; i++)
    {
        arr.emplace_back(i);
    }
    vector<int> v = Solution().twoSum(arr, arr[0] + arr[8]);
    if(v.size() == 2)
    {
        sort(v.begin(), v.end());
        if(v[0] == 0 && v[1] == 8)
        {
            std::cout << "通过用例1, 两个数的下标分别是: 0, 8" << std::endl;
            return;
        }
    }
    std::cout << "没有通过用例1, 两个数的下标分别是: 0, 8" << std::endl;
}

int main()
{
    Test1();
    Test2();
    return 0;
}